﻿@{
    ViewBag.Title = "Thêm sản phẩm";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

@model IEnumerable<EC_ASS.Models.Category>

<form action="@Url.Action("AddItem", "Admin")" class="form-horizontal" style="margin-top: 20px;" method="post" id="addForm" 
                                                                                                    enctype="multipart/form-data">
    <div class="control-group">
        <label class="control-label" for="inputName">Tên</label>
        <div class="controls">
            <input type="text" id="inputName" name="Name" required />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputNumber">Số lượng</label>
        <div class="controls">
            <input type="number" id="inputNumber" name="NumOfProduct" required />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="f1">Hình ảnh</label>
        <div class="controls">
            <input type="file" id="f1" name="f1" />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="f2">Ảnh chi tiết</label>
        <div class="controls">
            <input type="file" id="f2" name="f2" multiple="multiple" />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputSource">Nguồn gốc nhập hàng</label>
        <div class="controls">
            <input type="text" id="inputSource" name="Source" required />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputPrice">Giá bán</label>
        <div class="controls">
            <input type="text" id="inputPrice" name="Price" required />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="f3">Trang HTML mô tả</label>
        <div class="controls">
            <input type="file" id="f3" name="f3" required />
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputCategory">Danh mục</label>
        <div class="controls">
            <select name="CatID">
                @foreach (var item in Model)
                {
                    <option value="@item.ID">@item.Name</option>
                }
            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" for="inputSize">Trang HTML mô tả</label>
        <div class="controls">
            <input type="text" id="inputSize" name="Size" required />
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <button type="submit" class="btn">Thêm sản phẩm</button>
        </div>
    </div>
</form>
